Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 4 - Colors and Color-Related Objects / Colors and Color-Related Objects Reference
Color Profile Functions / Retrieving and Replacing Profile Information


GXSetColorProfile

You can use the GXSetColorProfile function to assign profile data to a color profile object.

void GXSetColorProfile(gxColorProfile target,long size, 
                        void *colorProfileData);
target
A reference to the color profile object whose profile data you want to change.
size
The size in bytes of the profile data to assign to the target color profile.
colorProfileData
A pointer to the profile data.
DESCRIPTION
The GXSetColorProfile function assigns the specified profile data to the target color profile. If you specify a nonzero value for the size parameter, the pointer to the profile data must not be nil. It should be in the form of a valid ColorSync color profile structure (type CMProfile), although the function does not actually verify this.

If you pass 0 for the size parameter to this function, QuickDraw GX converts this profile into a zero-length profile, which you can use to inhibit color matching.

SPECIAL CONSIDERATIONS
If you attempt to alter the profile data of a color profile object used by an onscreen view device, this function posts a colorProfile_access_restricted warning.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
colorProfile_is_nil 
inconsistent_parameters(debugging version)
parameter_out_of_range(debugging version)
Warnings 
colorProfile_access_restricted(debugging version)
SEE ALSO
To examine the profile data in a color profile object, use the GXGetColorProfile function, described in the previous section.

Zero-length profiles are described in the section "Zero-Length Profiles" on page 4-37.

The format of the profile data in a color profile object is described in the section "Profile Data" beginning on page 4-36. The ColorSync Utilities, including the CMProfile data type, are described in Inside Macintosh: Advanced Color Imaging.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996